﻿using MyMeeting.Views;
using MyMeeting.Views.Dialogs;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyMeeting.ViewModels.Dialogs
{
    public class NineGridLayoutViewModel : BindableBase, IDialogAware
    {
        public string Title =>"九宫格测试";

        public event Action<IDialogResult> RequestClose;
        public DelegateCommand<NineGridLayoutView> AddControlCommand { get; set; }

        public NineGridLayoutViewModel()
        {
            AddControlCommand = new DelegateCommand<NineGridLayoutView>(AddControl);
        }

        private void AddControl(NineGridLayoutView v)
        {
            v.ninePanel.AddVideoVisual(new System.Windows.Controls.Button());
        }

        public bool CanCloseDialog()
        {
            return true;
        }

        public void OnDialogClosed()
        {
        }

        public void OnDialogOpened(IDialogParameters parameters)
        {
        }
    }
}
